#include <algorithm>
#include <limits>
#include <string>
#include <iostream>
#include <vector>

using ll = long long;

namespace dp{
    std::vector<std::vector<ll>> dp;
    ll getans(std::string a,std::string b){
        dp.resize(std::max(a.size(),b.size())+1,std::vector<ll>(std::max(a.size(),b.size())+1,0));
        a=' '+a,b=' '+b;
        for(ll i{0};i<std::max({a.size(),b.size()});i++){
            dp[0][i]=i;
            dp[i][0]=i;
        }
        for(ll i{1};i<=a.size();i++){
            for(ll j{1};j<=b.size();j++){
                if(a[i]==b[j]){
                    dp[i][j]=dp[i-1][j-1];
                }else{
                    dp[i][j] = std::min({
                        dp[i-1][j]+1, //删除
                        dp[i][j-1]+1, //增加
                        dp[i-1][j-1]+1//修改
                    });
                }
            }
        }
        return dp[a.size()][b.size()];
    }
}

std::string s,t;

int main(){
    std::cin>>s>>t;
}